﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using SharedLib.XmlDataModel;
using System.Xml;
using SharedLib.Helpers;
namespace Tracy.DataModel
{
    public class Format : XmlDataModelWithAliases
    {
        public Format() : base() { }
        public Format(XmlNode node)
            : base(node)
        {
        }

        /// <summary>
        /// Name of the Fan sub group
        /// </summary>
        public override string Name
        {
            get { return Attributes["name"]; }
            set { Attributes["name"] = value; }
        }

        public override int GetHashCode()
        {
            if (Name != null)
                return Name.GetHashCode();
            else
                return "".GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if (obj is FanSubGroup)
            {
                return Name == ((FanSubGroup)obj).Name;
            }
            return base.Equals(obj);
        }

        public override string RootNodeName
        {
            get
            {
                return "format";
            }
        }
        
    }
}
